package com.atguigu.a_collection;

public class Demo3 {
    public static void main(String[] args) {
        //向上转型
        //Animal a = new Dog();
        Object[] objs = new String[5];
        System.out.println("objs = " + objs);

        //向下转型 : 前提是 对象的真实类型确实是子类型
        //Dog dog = (Dog)a;
        String[] names = (String[]) objs;
        System.out.println("names = " + names);
    }
}
